package com.yuyang.gulimall.auth.feign;

import com.yuyang.common.utils.R;
import com.yuyang.gulimall.auth.to.UserLoginTo;
import com.yuyang.gulimall.auth.to.UserRegisterTo;
import com.yuyang.gulimall.auth.vo.SocialUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author yu yang
 * @date 2023/1/19 -21:46
 */
@FeignClient("gulimall-member")
public interface MemberFeignServer {
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterTo userRegisterTo);

    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginTo to);

    @PostMapping("/member/member/OAuth2/weiboLogin")
    R weiboLogin(@RequestBody SocialUser to);
}
